package com.example.hcbmsm.controller;

import com.example.hcbmsm.domain.Ai;
import com.example.hcbmsm.service.AiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Xinghm
 * @version 1.0
 * @since 2024/11/5 19:45
 */
@RestController
@CrossOrigin
@RequestMapping("/ai")
public class AiController {
    @Autowired
    private AiService aiService;

    @GetMapping("/list")
    public Map list(Long docId, int page, int limit){
        return aiService.list(docId, page, limit);
    }

    @PostMapping("/renew")
    public Map renew(@RequestBody Ai ai){
        return aiService.renew(ai);
    }
}
